import request from '@/utils/request.js'

// 获取列表数据
export const getPetList = (params) => {
    return request({
        url: '/owners/pet',
        method: 'get',
        params
    })
}

// 删除列表数据
export const delPetList = (id) => {
    return request({
        url: '/owners/pet/' + id,
        method: 'delete'
    })
}

// 添加数据
export const addPetList = (data) => {
    return request({
        url: '/owners/pet',
        method: 'post',
        data
    })
}

// 获取详情
export const getPetInfo = (id) => {
    return request({
        url: '/owners/pet/' + id,
        method: 'get',
    })
}

// 修改数据
export const editPetList = (data) => {
    return request({
        url: '/owners/pet/' + data.id,
        method: 'put',
        data
    })
}